<?php

namespace Proyecto\MainBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class PlantillaType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('descripcion','text',array('required' => true));
        $builder->add('activo','checkbox', array('required' => false));
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Proyecto\MainBundle\Entity\Plantilla'
        ));
    }

    public function getName()
    {
        return 'proyecto_mainbundle_plantillatype';
    }
}
